﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/MasterPage.Master" AutoEventWireup="true"
    CodeBehind="CampanhaCadastro.aspx.cs" Inherits="PopPromotoraCallCenter.Admin.CampanhaCadastro" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadElements" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentElements" runat="server">
    <script language="javascript" type="text/javascript">
        function SoNumeros(e) {
            if (document.all) // Internet Explorer
                var tecla = event.keyCode;
            else if (document.layers) // Nestcape
                var tecla = e.which;
            if (tecla > 47 && tecla < 58) // numeros de 0 a 9
                // if (tecla < 47 || tecla > 58) // letras de A a Z
                return true;
            else {
                if (tecla != 8) // backspace
                {
                    event.keyCode = 0;
                    return false;
                }
                else
                    return true;
                //alert("Digite somente números");
            }
        }
    </script>
    <nav class="titleFilter">
        <ul>
            <li>
                <h1>Campanha</h1>
                <ul class="navTitle">
                    <li><i class="icon-plus"></i></li>
                </ul>
                <div class="formFillButton" style="width: 300px">
                    <asp:Button ID="btnNovo" runat="server" Text="Nova campanha"
                        OnClick="btnNovo_Click" Visible="false" />

                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="btnVoltar" runat="server" Text="Voltar" CssClass="BotaoForm" OnClick="btnVoltar_Click" />

                </div>
            </li>
            <li>
                <div id="CollapsiblePanel1" class="CollapsiblePanel">
                    <div class="CollapsiblePanelTab" tabindex="0">
                        <img src="../Styles/Images/filtro.png" align="absmiddle" />
                    </div>
                    <div class="CollapsiblePanelContent formFilter">
                        <table border="0">
                            <tr>
                                <th>
                                    <label>Convênio: </label>
                                </th>
                                <td>
                                    <asp:DropDownList ID="ddlFiltroConvenio" runat="server" /></td>
                            </tr>
                            <tr>
                                <th>
                                    <label>Campanha:</label></th>
                                <td>
                                    <asp:DropDownList ID="ddlFiltroTipo" runat="server" /></td>
                            </tr>
                        </table>
                        <asp:Button Text="Filtrar" runat="server" ID="btnFiltrar" OnClick="btnFiltrar_Click" />
                    </div>
                </div>
            </li>
        </ul>
    </nav>
    <div class="clearBoth height30"></div>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server">
        <ProgressTemplate>
            <div style="position: absolute; z-index: 1;">
                <div style="position: absolute; margin-left: 200px; margin-top: 70px; display: block;">
                    <span id="spanLoading">
                        <img src="../images/carregar.gif" />
                    </span>
                </div>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <Triggers>
            <asp:PostBackTrigger ControlID="btnGravar" />
            <asp:PostBackTrigger ControlID="btnGravarSituacao" />
        </Triggers>
        <ContentTemplate>
            <div>

                <asp:HiddenField ID="hfCampanhaId" runat="server" Value="0" />
                <asp:MultiView ID="mvCampanha" runat="server" ActiveViewIndex="0">
                    <asp:View ID="View1" runat="server">
                        <br />
                        <asp:Label ID="lblMsgGrid" runat="server" Text="" ForeColor="Red"></asp:Label><br />
                        <asp:GridView ID="gvCampanha" runat="server" DataKeyNames="idCampanha,fgAtivo" AutoGenerateColumns="False"
                            CellPadding="4" GridLines="None" OnRowCommand="gvCampanha_RowCommand" OnRowDataBound="gvCampanha_RowDataBound" CssClass="report">
                            <Columns>
                                <asp:BoundField HeaderText="Nome" DataField="nomeCampanha" />
                                <asp:BoundField HeaderText="Descrição" DataField="descricao" />
                                <asp:BoundField HeaderText="Apelido" DataField="alias" />
                                <asp:BoundField HeaderText="Finalização" ItemStyle-HorizontalAlign="Center"
                                    DataFormatString="{0:dd/MM/yyyy}" DataField="dtFinalizacao">
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:BoundField>
                                <asp:BoundField HeaderText="Cadastro" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:dd/MM/yyyy}"
                                    DataField="dtCadastro">
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:BoundField>
                                <asp:BoundField HeaderText="Convênio" DataField="Convenio" />
                                <asp:BoundField HeaderText="Status" ItemStyle-HorizontalAlign="Center" DataField="fgAtivo">
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="Situação" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <asp:ImageButton ID="btnSituacao" runat="server" CommandArgument='<%# Container.DataItemIndex %>'
                                            CommandName="situacao" ImageUrl="../Styles/Images/ver.png" ToolTip="Situações" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Clientes" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <asp:ImageButton ID="btnCliente" runat="server" CssClass="BotaoForm" CommandArgument='<%# Container.DataItemIndex %>'
                                            CommandName="cliente" ImageUrl="../Styles/Images/cliente.png" ToolTip="Clientes" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Atendentes" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <asp:ImageButton ID="btnAtendente" runat="server" CssClass="BotaoForm" CommandArgument='<%# Container.DataItemIndex %>'
                                            CommandName="atendente" ImageUrl="../Styles/Images/atendente.png" ToolTip="Atendentes" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Editar" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <asp:ImageButton ID="btnEditar" runat="server" CssClass="BotaoForm" CommandArgument='<%# Container.DataItemIndex %>'
                                            CommandName="editar" ImageUrl="../Styles/Images/editar.png" ToolTip="Editar" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Desabilitar" ItemStyle-HorizontalAlign="Center">
                                    <ItemStyle HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:ImageButton ID="btnStatus" runat="server" CssClass="BotaoForm" CommandArgument='<%# Container.DataItemIndex %>'
                                            CommandName="status" ImageUrl="../Styles/Images/desabilitar.png" ToolTip="Desabilitar" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Excluir" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <asp:ImageButton ID="btnExcluir" runat="server" CssClass="BotaoForm" CommandArgument='<%# Container.DataItemIndex %>'
                                            CommandName="excluir" ImageUrl="../Styles/Images/lixeira.png" ToolTip="Excluir" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                        <br />
                    </asp:View>
                    <asp:View ID="View2" runat="server">
                        <section class="formFill">
                            <div id="TabbedPanels2" class="TabbedPanels">
                                <ul class="TabbedPanelsTabGroup">
                                    <li class="TabbedPanelsTab" tabindex="0">Campanha</li>
                                </ul>
                                <div class="TabbedPanelsContentGroup">
                                    <div class="TabbedPanelsContent">
                                        <table>
                                            <tr>
                                                <th>
                                                    <label>Ativo:</label></th>
                                                <td>
                                                    <asp:CheckBox ID="cbAtivo" runat="server" />
                                                </td>
                                                <th rowspan="3" id="thCopiardados" runat="server">
                                                    <label>
                                                        <asp:Label runat="server" ID="lblCopiar" Text="Copiar dados:" /></th>
                                                <td rowspan="3">
                                                    <asp:DropDownList ID="ddlCampanhaCopia" CssClass="CampoForm" runat="server" />
                                                    <br style="margin-bottom: 10px;" />
                                                    <asp:CheckBoxList ID="cblCampanhaCopia" runat="server" CssClass="multiline">
                                                        <asp:ListItem Text="Clientes" Value="0"></asp:ListItem>
                                                        <asp:ListItem Text="Atendentes" Value="1"></asp:ListItem>
                                                        <asp:ListItem Text="Situações e Regras" Value="2"></asp:ListItem>
                                                    </asp:CheckBoxList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <th>
                                                    <label>Tipo:</label></th>
                                                <td>
                                                    <asp:DropDownList ID="ddlTipoCampanha" runat="server" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <th>
                                                    <label>Convênio: </label>
                                                </th>
                                                <td>
                                                    <asp:DropDownList ID="ddlConvenio" runat="server" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <th>
                                                    <label>Nome:</label></th>
                                                <td>
                                                    <asp:TextBox ID="txtNomeCampanha" MaxLength="200" runat="server"></asp:TextBox></td>
                                                <th rowspan="3">
                                                    <label>Descrição:</label></th>
                                                <td rowspan="3">
                                                    <asp:TextBox ID="txtDescricao" TextMode="MultiLine" MaxLength="800"
                                                        Rows="5" Columns="68" runat="server"></asp:TextBox>
                                                </td>
                                            </tr>

                                            <tr>
                                                <th>
                                                    <label>
                                                        Apelido:</label></th>
                                                <td>
                                                    <asp:TextBox ID="txtApelido" MaxLength="50" runat="server"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <th>
                                                    <label>
                                                        Data final:</label></th>
                                                <td>
                                                    <asp:TextBox ID="txtDataFinalizacao" runat="server" MaxLength="10"></asp:TextBox>
                                                    <asp:MaskedEditExtender ID="MaskedEditExtender1" TargetControlID="txtDataFinalizacao"
                                                        Mask="99/99/9999" MaskType="Date" runat="server">
                                                    </asp:MaskedEditExtender>
                                                    <asp:CalendarExtender ID="CalendarExtender1" TargetControlID="txtDataFinalizacao"
                                                        runat="server" Format="dd/MM/yyyy">
                                                    </asp:CalendarExtender>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="4">
                                                    <div class="formFillButton" id="dvGravar" runat="server">
                                                        <asp:Button ID="btnGravar" runat="server" Text="Gravar" CssClass="BotaoForm" OnClick="btnGravar_Click" />
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="4">
                                                    <asp:Panel ID="pnlSituacao" runat="server">
                                                        <div>
                                                            <div>
                                                                <table>
                                                                    <tr>
                                                                        <th>
                                                                            <label>Situação</label></th>
                                                                        <td>
                                                                            <asp:DropDownList ID="ddlSituacao" CssClass="CampoForm" runat="server" />
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <th>
                                                                            <label>Regras</label></th>
                                                                        <td>
                                                                            <asp:CheckBoxList ID="cblRegra" runat="server" RepeatColumns="2" RepeatDirection="Horizontal" />
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <th>
                                                                            <label>Incidencia</label></th>
                                                                        <td>
                                                                            <asp:TextBox ID="txtIncidencia" runat="server" Width="40px" />
                                                                            <asp:FilteredTextBoxExtender ID="ftxtQtde" runat="server" FilterType="Numbers, Custom" ValidChars="," TargetControlID="txtIncidencia" />
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <th>
                                                                            <label>Quantidade Dias</label></th>
                                                                        <td>
                                                                            <asp:TextBox ID="txtQtdDias" runat="server" Width="40px"  />
                                                                            <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" FilterType="Numbers, Custom" ValidChars="," TargetControlID="txtQtdDias" />
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td colspan="2">
                                                                            <asp:GridView ID="gvSituacao" runat="server" AutoGenerateColumns="False" CellPadding="4"
                                                                                ForeColor="#333333" GridLines="None" DataKeyNames="idStatus,idCampanhaStatus,Qtd,Dias,fgBloqueio"
                                                                                OnRowCommand="gvSituacao_RowCommand" OnRowDataBound="gvSituacao_RowDataBound"
                                                                                CssClass="report">
                                                                                <Columns>
                                                                                    <asp:BoundField HeaderText="Situação" DataField="nomeStatus" />
                                                                                    <asp:BoundField HeaderText="Tabulação" DataField="Qtd" />
                                                                                    <asp:BoundField HeaderText="Dias" DataField="Dias" />
                                                                                    <asp:TemplateField HeaderText="Regras">
                                                                                        <ItemTemplate>
                                                                                            <asp:Repeater ID="rptRegra" runat="server">
                                                                                                <HeaderTemplate>
                                                                                                    <ul>
                                                                                                </HeaderTemplate>
                                                                                                <ItemTemplate>
                                                                                                    <li>
                                                                                                        <%# String.Format("<a onclick='javascript:ShowMessage(\"{0}\",\"{1}\");void(0);' href='#'>{0}</a>", Eval("NomeRegra"), Eval("DescricaoRegra"))%>
                                                                                                    </li>
                                                                                                </ItemTemplate>
                                                                                                <FooterTemplate>
                                                                                                    </ul>
                                                                                                </FooterTemplate>
                                                                                            </asp:Repeater>
                                                                                        </ItemTemplate>
                                                                                    </asp:TemplateField>
                                                                                    <asp:TemplateField HeaderText="Editar" ItemStyle-HorizontalAlign="Center">
                                                                                        <ItemTemplate>
                                                                                            <asp:ImageButton ID="btnEditar" CommandArgument='<%# Container.DataItemIndex %>' CommandName="editar"
                                                                                                runat="server" ImageUrl="../Styles/Images/editar.png" />
                                                                                        </ItemTemplate>
                                                                                    </asp:TemplateField>
                                                                                    <asp:TemplateField HeaderText="Excluir" ItemStyle-HorizontalAlign="Center">
                                                                                        <ItemTemplate>
                                                                                            <asp:ImageButton ID="btnExcluir" CommandArgument='<%# Container.DataItemIndex %>' CommandName="excluir"
                                                                                                runat="server" ImageUrl="../Styles/Images/lixeira.png" />
                                                                                        </ItemTemplate>
                                                                                    </asp:TemplateField>
                                                                                </Columns>
                                                                            </asp:GridView>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td colspan="2">
                                                                            <div class="formFillButton">
                                                                                <asp:Button ID="btnNovaSituacao" runat="server" Text="Nova situação" CssClass="BotaoForm" OnClick="btnNovaSituacao_Click" />
                                                                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                                                <asp:Button ID="btnGravarSituacao" runat="server" CssClass="BotaoForm" Text="Gravar" OnClick="btnGravarSituacao_Click" />
                                                                            </div>

                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </div>
                                                        </div>
                                                        <asp:HiddenField ID="hfidCampanhaStatus" runat="server" Value="0" />
                                                        <div>
                                                            <asp:Label ID="lblMsg" runat="server" Text="" ForeColor="Red"></asp:Label></li>
                                                        </div>
                                                    </asp:Panel>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </section>
                        <asp:Panel ID="pnlCliente" runat="server">
                            <span class="TituloForm">Filtrar Clientes para Campanha</span><br />
                            <div class="formFill" style="width: auto">
                                <table>
                                    <tr>
                                        <th>
                                            <label>
                                                CPF
                                            </label>
                                        </th>
                                        <td>
                                            <asp:TextBox ID="txtCPFFiltro" runat="server"></asp:TextBox>
                                        </td>
                                        <th>
                                            <label>
                                                Nome
                                            </label>
                                        </th>
                                        <td>
                                            <asp:TextBox ID="txtNomeFiltro" runat="server"></asp:TextBox>
                                        </td>
                                        <th>
                                            <label>
                                                Idade DE
                                            </label>
                                        </th>
                                        <td>
                                            <asp:TextBox ID="txtIdadeDe" runat="server" Width="30px" />
                                        </td>
                                        <th>
                                            <label>
                                                Até
                                            </label>
                                        </th>
                                        <td>
                                            <asp:TextBox ID="txtIdadeAte" runat="server" Width="30" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <th>
                                            <label>UF</label></th>
                                        <td>
                                            <div style="overflow: auto; height: 200px; width: 200px">
                                                <asp:CheckBoxList ID="cblUFFiltro" runat="server" Width="200px">
                                                </asp:CheckBoxList>
                                            </div>
                                        </td>
                                        <th>
                                            <label>
                                                Cidade
                                            </label>
                                        </th>
                                        <td>
                                            <div style="overflow: auto; height: 200px;">
                                                <asp:CheckBoxList ID="cblCidadeFiltro" runat="server" Width="200px">
                                                </asp:CheckBoxList>
                                            </div>
                                        </td>
                                        <th>
                                            <label>
                                                Bairro
                                            </label>
                                        </th>
                                        <td colspan="3">
                                            <div style="overflow: auto; height: 200px;">
                                                <asp:CheckBoxList ID="cblBairroFiltro" runat="server" Width="200px">
                                                </asp:CheckBoxList>
                                                &nbsp;
                                            </div>
                                        </td>

                                    </tr>
                                    <tr>
                                        <th>
                                            <label>
                                                CEP
                                            </label>
                                        </th>
                                        <td>
                                            <asp:TextBox ID="txtCEPFiltro" runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th>
                                            <label>
                                                PMT DE
                                            </label>
                                        </th>
                                        <td>
                                            <asp:TextBox ID="txtPMTFiltroDe" runat="server"></asp:TextBox>
                                        </td>
                                        <th>
                                            <label>
                                                Até
                                            </label>
                                        </th>
                                        <td>
                                            <asp:TextBox ID="txtPMTFiltroAte" runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th>
                                            <label>
                                                Score DE
                                            </label>
                                        </th>
                                        <td>
                                            <asp:TextBox ID="txtScoreFiltroDE" runat="server"></asp:TextBox>
                                        </td>
                                        <th>
                                            <label>
                                                Até
                                            </label>
                                        </th>
                                        <td>
                                            <asp:TextBox ID="txtScoreFiltroAte" runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th>
                                            <label>
                                                Margem De
                                            </label>
                                        </th>

                                        <td>
                                            <asp:TextBox ID="txtMargemFiltroDe" runat="server"></asp:TextBox>
                                        </td>
                                        <th>
                                            <label>Até</label></th>
                                        <td>
                                            <asp:TextBox ID="txtMargemFiltroAte" runat="server" CssClass="CampoForm"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th>
                                            <label>
                                                Prazo De
                                            </label>
                                        </th>
                                        <td>
                                            <asp:TextBox ID="txtPrazoFiltroDe" runat="server"></asp:TextBox>
                                        </td>
                                        <th>
                                            <label>Até</label></th>
                                        <td>
                                            <asp:TextBox ID="txtPrazoFiltroAte" runat="server" CssClass="CampoForm"></asp:TextBox>
                                        </td>
                                        <th>
                                            <label>
                                                Orgão
                                            </label>
                                        </th>
                                        <td>
                                            <asp:DropDownList ID="ddlOrgao" runat="server" CssClass="CampoForm" Width="145px" />
                                        </td>
                                    </tr>

                                    <tr>
                                        <th>
                                            <label>
                                                Bancos
                                            </label>
                                        </th>
                                        <td>
                                            <div style="overflow: auto; height: 200px;">
                                                <asp:CheckBoxList ID="cblBancosFiltro" runat="server" Width="200px">
                                                </asp:CheckBoxList>
                                            </div>
                                        </td>
                                        <th>
                                            <label>
                                                Convênio
                                            </label>
                                        </th>
                                        <td>
                                            <div style="overflow: auto; height: 200px;">
                                                <asp:CheckBoxList ID="cblConvenioFiltro" runat="server" Width="200px">
                                                </asp:CheckBoxList>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div class="formFillButton">
                                <asp:Button ID="btnPesquisarCliente" runat="server" Text="Pesquisar" OnClick="btnPesquisarCliente_Click" />
                            </div>
                            <br />
                            <asp:TabContainer ID="TabContainer1" runat="server" Width="600" ActiveTabIndex="1">
                                <asp:TabPanel runat="server" ID="tabClientePesquisa">
                                    <HeaderTemplate>
                                        Selecionar Clientes
                                    </HeaderTemplate>
                                    <ContentTemplate>
                                        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                            <ContentTemplate>
                                                <div class="formFill">
                                                    <table>
                                                        <tr>
                                                            <th>
                                                                <label>
                                                                    Quantidade
                                                                </label>
                                                            </th>
                                                            <td>
                                                                <asp:Label ID="lblQuantidadeClientePesquisa" runat="server" Text=""></asp:Label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <th>
                                                                <label>
                                                                    Resultado
                                                                </label>
                                                            </th>
                                                            <td>
                                                                <asp:ListBox ID="lbClientePesquisa" runat="server" SelectionMode="Multiple"
                                                                    Height="200"></asp:ListBox>
                                                                <span class="DescCampoForm">Pag.</span>
                                                                <asp:DropDownList ID="ddlPaginaCliente" runat="server" AutoPostBack="true"
                                                                    OnSelectedIndexChanged="ddlPaginaCliente_SelectedIndexChanged">
                                                                </asp:DropDownList>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="2">
                                                                <div class="formFillButton">
                                                                    <asp:Button ID="btnAdicionar" runat="server" Text="Gravar Selecionados" CssClass="BotaoForm"
                                                                        OnClick="btnAdicionar_Click" />
                                                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                                    <asp:Button ID="btnGravarTodos" runat="server" Text="Gravar todos" CssClass="BotaoForm"
                                                                        OnClick="btnGravarTodos_Click" />
                                                                </div>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                    </ContentTemplate>
                                </asp:TabPanel>
                                <asp:TabPanel runat="server" ID="tabClienteCampanha">
                                    <HeaderTemplate>
                                        Clientes da Campanha
                                    </HeaderTemplate>
                                    <ContentTemplate>
                                        <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                                            <Triggers>
                                                <%--<asp:PostBackTrigger ControlID="btnRemover" />--%>
                                            </Triggers>
                                            <ContentTemplate>
                                                <div class="formFill">
                                                    <table>
                                                        <tr>
                                                            <th>
                                                                <label>
                                                                    Total Clientes
                                                                </label>
                                                            </th>
                                                            <td>
                                                                <asp:Label ID="lblTotalClienteCampanha" runat="server" Text=""></asp:Label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <th>
                                                                <label>Clientes</label></th>
                                                            <td>
                                                                <asp:ListBox ID="lbClienteSelecionado" runat="server" SelectionMode="Multiple" Height="200"></asp:ListBox>
                                                                <span class="DescCampoForm">Pag.</span>
                                                                <asp:DropDownList ID="ddlPaginaClienteSelecionado" runat="server" AutoPostBack="true"
                                                                    OnSelectedIndexChanged="ddlPaginaClienteSelecionado_SelectedIndexChanged">
                                                                </asp:DropDownList>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="2" class="formFillButton">
                                                                <asp:Button ID="btnRemover" runat="server" Text="Remover" CssClass="BotaoForm" OnClick="btnRemover_Click" />
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                    </ContentTemplate>
                                </asp:TabPanel>
                            </asp:TabContainer>
                        </asp:Panel>
                        <asp:Panel ID="pnlAtendente" runat="server">
                            <div class="formFill">
                                <table>
                                    <tr>
                                        <th >
                                            <label style="width:150px">Atendentes</label></th>
                                        <td>
                                            <asp:DropDownList ID="ddlLetraAtendente" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlLetraAtendente_SelectedIndexChanged">
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th>
                                            <label style="width:150px">Filtro Atendentes</label></th>
                                        <td>
                                            <asp:TextBox ID="txtFiltroAtendente" runat="server"></asp:TextBox>
                                        </td>
                                        <td>
                                            <asp:Button ID="btnFiltroAtendente" CssClass="BotaoForm" runat="server" Text="Filtrar"
                                                OnClick="btnFiltroAtendente_Click" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <th>
                                            <label style="width:150px">Atendentes Total</label></th>
                                        <td>
                                            <asp:Label ID="lblTotalAtendente" runat="server" Text=""></asp:Label>
                                        </td>
                                        <td></td>
                                        <th>
                                            <label style="width:150px">
                                                Atendentes
                                            </label>
                                        </th>
                                        <td>
                                            <asp:Label ID="lblTotalAtendenteCampanha" runat="server" Text=""></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th>
                                            <label style="width:150px">Lista Atendentes</label></th>
                                        <td>
                                            <asp:ListBox ID="lbAtendente" runat="server" SelectionMode="Multiple"
                                                Height="200"></asp:ListBox>
                                            <br />
                                            <span class="DescCampoForm">Pag.</span>
                                            <asp:DropDownList ID="ddlPaginaAtendente" runat="server" AutoPostBack="true"
                                                OnSelectedIndexChanged="ddlPaginaAtendente_SelectedIndexChanged">
                                            </asp:DropDownList>
                                        </td>
                                        <td>
                                            <asp:Button ID="btnAdicionarAtendente" runat="server" Text=">>" CssClass="BotaoForm"
                                                OnClick="btnAdicionarAtendente_Click" />
                                            <br />
                                            <br />
                                            <asp:Button ID="btnRemoverAtendente" runat="server" Text="<<" CssClass="BotaoForm"
                                                OnClick="btnRemoverAtendente_Click" />
                                            <br />
                                            <br />
                                            <asp:Button ID="btnGravarTodosAtendente" runat="server" Text="Gravar todos" CssClass="BotaoForm"
                                                OnClick="btnGravarTodosAtendente_Click" />
                                        </td>
                                        <th>
                                            <label style="width:150px">
                                                Atendentes
                                            </label>
                                        </th>
                                        <td>
                                            <asp:DropDownList ID="ddlLetraAtendenteSelecionado" runat="server" AutoPostBack="true"
                                                OnSelectedIndexChanged="ddlLetraAtendenteSelecionado_SelectedIndexChanged">
                                            </asp:DropDownList>
                                            <br />
                                            <asp:TextBox ID="txtFiltroAtendenteSelecionado" runat="server" Width="140px"></asp:TextBox>
                                            <asp:Button ID="btnFiltroAtendenteSelecionado"  runat="server"
                                                Text="Filtrar" OnClick="btnFiltroAtendenteSelecionado_Click" /><br />
                                            <asp:ListBox ID="lbAtendenteSelecionado" runat="server" SelectionMode="Multiple"
                                                CssClass="CampoForm" Height="200"></asp:ListBox>
                                            <br />
                                            <span class="DescCampoForm">Pag.</span>
                                            <asp:DropDownList ID="ddlPaginaAtendenteSelecionado" runat="server" AutoPostBack="true"
                                                CssClass="CampoForm" OnSelectedIndexChanged="ddlPaginaAtendenteSelecionado_SelectedIndexChanged">
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </asp:Panel>
                    </asp:View>
                </asp:MultiView>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
